// ===================================
// <copyright>
// This file is part of LABSMFController.
//
//    LABSMFController is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    LABSMFController is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with LABSMFController.  If not, see <http://www.gnu.org/licenses/>.
//    Copyright 2011 David Bakker
//
//</copyright>
// <author>David Bakker</author>
// <email>mailto:DavidFBakker@gmail.com</email>
// <created>Saturday, May 07, 2011</created>
// <lastedit>Saturday, May 07, 2011</lastedit>
// ===================================

using System;
using Microsoft.SPOT;

namespace LABSMFController.UI
{
    /// <summary>
    /// Provide application-specific text and images for the items to be logged.	
    /// </summary>
    /// <remarks>
    /// Enables customizing the data logger for different logging targets.
    /// This example uses marsh birds.	
    /// To use a different number of targets, edit this file and also make these changes in Program.cs:
    /// Define a StackPanel for each target button (target1, target2, etc.) 
    /// Edit PlaceItemsInPanels() for the new number of target buttons.	
    /// </remarks> 
    internal class Targets
    {
        // The number of target buttons for logging data on the touch screen.

        internal const int numberOfTargetButtons = 1;

        // Descriptions of the items to log.

        internal String[] targetType = {
                                           "American Bittern",
                                           "Least Bittern",
                                           "Marsh Wren",
                                           "Sora",
                                           "Virginia Rail",
                                       };

        /// <summary>
        /// Get a bitmap for each target image.
        /// </summary>
        /// <remarks>
        /// Each target has two images, a normal image and a second image that displays briefly on detecting a touch.
        /// For example, the "clicked" images can be brighter.
        /// Add 100 to the normal-image case to get the clicked-image case.
        /// The image files referenced are in Solution Explorer > Resources.
        /// Add new images in Resources.resx using the Add Resource tab.
        /// </remarks> 
        internal static Bitmap InitializeImage(Int32 imageNumber)
        {
            try
            {
                switch (imageNumber)
                {
                    case 1:
                        return Resources.GetBitmap(Resources.BitmapResources.Reset);

                    case 101:
                        return Resources.GetBitmap(Resources.BitmapResources.Reset_clicked);

                    default:
                        return null;
                }
            }
            catch (Exception ex)
            {
                Debug.Print(ex.Message);
                return null;
            }
        }
    }
}